Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Kotlin 2.1.10 #44497

Open
wants to merge 1 commit into
base: 4.0.x
Choose a base branch
from

Conversation

dmitrysulman
Copy link
Contributor

@dmitrysulman dmitrysulman commented Feb 28, 2025

Upgrade to Kotlin 2.1.10:

See gh-38539

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 28, 2025
@wilkinsona
Copy link
Member

wilkinsona commented Feb 28, 2025

Thanks for the PR. Unfortunately, moving the examples to a kotlin subpackage will cause problems with docs. Instead, we prefer this build.gradle approach:

// To avoid a redeclaration error with Kotlin compiler
tasks.named('compileKotlin', KotlinCompilationTask.class) {
    javaSources.from = []
}

It hides the Java sources from Kotlin compilation.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Feb 28, 2025
@dmitrysulman
Copy link
Contributor Author

@wilkinsona thanks for the feedback.

Unfortunately, moving the examples to a kotlin subpackage will cause problems with docs.

Yes, I wasn't sure about this approach. I changed include-kotlin property value in the antora-asciidoc-attributes.properties:

include-kotlin= ROOT:example$kotlin/org/springframework/boot/docs/kotlin

and was able to build the docs locally without a problem.

Anyway I'll fix the PR according to your suggestion.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Feb 28, 2025
- Upgrade kotlinVersion to 2.1.10
- Remove org.jetbrains.kotlin:kotlin-compiler-embeddable from dependencies
- Replace deprecated kotlinOptions with compilerOptions
- Update KotlinConventions of ConventionsPlugin to set Kotlin apiVersion
  and languageVersion to 2.1
- Fix redeclaration error with Kotlin compiler on spring-boot-doc
- Upgrade PluginClasspathGradleBuild to inject missed Kotlin compiler
  related jars

See spring-projectsgh-38539

Signed-off-by: Dmitry Sulman <[email protected]>
@dmitrysulman dmitrysulman force-pushed the kotlin-2.1.10-migration branch from 1d9bbc4 to d757a21 Compare March 1, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants